package com.atguigu.gulimall.search.utils.others;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.atguigu.common.utils.R;

public class Other {

    public static <T> T getData(R r, String key, TypeReference<T> typeReference){
        Object data=r.get(key);
        String s= JSON.toJSONString(data);
        T t=JSON.parseObject(s,typeReference);
        return t;
    }
}
